home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / tppop16.zip / UPPRCASE.ASM < prev    next >
Assembly Source File  |  1988-02-21  |  775b  |  44 lines

  1. public    UpperCase
  2.  
  3. stk_struc  struc
  4.  
  5. old_bp   dw    ?
  6. return   dw    ?
  7. line     dd    ?
  8.  
  9. stk_struc   ends
  10.  
  11. cseg     segment para public 'code'
  12.          assume  cs:cseg
  13.  
  14. UpperCase proc near
  15.  
  16.          push      bp
  17.          mov       bp,sp
  18.          push      ds
  19.          cld
  20.          lds       si,line[bp]
  21.          mov       cl,[si]
  22.          xor       ch,ch
  23.          jcxz      done
  24. next_char:
  25.          inc       si
  26.          cmp       byte ptr [si],'a'
  27.          jb        no_change
  28.          cmp       byte ptr [si],'z'
  29.          ja        no_change
  30.          sub       byte ptr [si],20h
  31. no_change:
  32.          loop      next_char
  33. done:
  34.          pop       ds
  35.          pop       bp
  36.          ret       4
  37.  
  38. UpperCase endp
  39.  
  40. cseg     ends
  41.  
  42. end
  43.  
  44.